﻿namespace LevelEditors
{
    using System;
    using UnityEngine;
    using UnityEngine.UI;

    [RequireComponent(typeof(Button))]
    public class UIAddLevelButton : MonoBehaviour
    {
        private void Awake()
        {
            base.GetComponent<Button>().onClick.AddListener(delegate {
                LevelEditor.Instance.AddLevel();
                base.transform.SetAsLastSibling();
            });
        }
    }
}

